// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */
// 商品管理
import Goods from '@/views/goods/Goods';
// 机器信息管理
import Machine from '@/views/machine/Machine';
// 货道信息管理
import MachineAisle from '@/views/machine/MachineAisle';
/**
 * 订单管理
 */
// 交易订单
import Order from '@/views/pay/Order';
/**
 * 系统管理
 */
// 用户管理
import user from '@/views/system/user';
// 菜单管理
import Module from '@/views/system/Module';
// 角色管理
import Role from '@/views/system/Role';
// 公司管理
import Dept from '@/views/system/Dept';
// 系统环境变量
import Variable from '@/views/system/Variable';
// 权限管理
import Permission from '@/views/system/Permission';
/**
 * 支付管理
 */
// 支付配置信息
import MachineConfig from '@/views/machine/MachineConfig';
// 支付配置
import Config from '@/views/pay/Config';
/**
 * 数据监控
 */
// 监控查询
import druidLogin from '@/views/druid/login';
//工单转接
import depTrans from '@/views/deptrans/depTrans'

// // 工单中心
import chooseCategory from '@/views/orderCenter/chooseCategory';

//提交工单
import submitOrder from '@/views/orderCenter/submitOrder';

// //我的工单
import myOrder from '@/views/orderCenter/myOrder';

//提交成功
import submitSuccess from '@/views/orderCenter/submitSuccess';

//我的工单详情
import myOrderDetail from '@/views/orderCenter/myOrderDetail';

//问题分类
import problemCategory from '@/views/managementCenter/problemCategory';
// 我受理的订单
import tsAccept from '@/views/tsAccept/TsAccept';
// 启用路由
Vue.use(Router);

// 导出路由
export default new Router({
    routes: [{
        path: '/',
        name: '',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [
            // 转接工单展示页面路由
            {
                path: '/deptrans/depTrans',
                name: 'depTrans',
                component: depTrans,
                meta: {
                    requireAuth: false
                }
            },
            {
                path: '/goods/Goods',
                name: '商品管理',
                component: Goods,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/machine/Machine',
                name: '机器信息管理',
                component: Machine,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/machine/MachineAisle',
                name: '货道信息管理',
                component: MachineAisle,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/pay/Order',
                name: '交易订单',
                component: Order,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/system/user',
                name: '用户管理',
                component: user,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/system/Module',
                name: '菜单管理',
                component: Module,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/system/Role',
                name: '角色管理',
                component: Role,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/system/Dept',
                name: '公司管理',
                component: Dept,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/system/Variable',
                name: '系统环境变量',
                component: Variable,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/system/Permission',
                name: '权限管理',
                component: Permission,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/machine/MachineConfig',
                name: '支付配置信息',
                component: MachineConfig,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/pay/Config',
                name: '支付配置',
                component: Config,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/druid/login',
                name: '监控查询',
                component: druidLogin,
                meta: {
                    requireAuth: true
                }
            }, , {
                path: '/orderCenter/chooseCategory',
                name: '选择工单分类',
                component: chooseCategory,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/orderCenter/submitOrder',
                name: '提交工单',
                component: submitOrder,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/orderCenter/myOrder',
                name: '我的工单',
                component: myOrder,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/orderCenter/submitSuccess',
                name: '提交成功',
                component: submitSuccess,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/orderCenter/myOrderDetail',
                name: '我的工单详情',
                component: myOrderDetail,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/managementCenter/problemCategory',
                name: '问题分类',
                component: problemCategory,
                meta: {
                    requireAuth: true
                }
            }
            , {
                path: '/tsAccept/TsAccept',
                name: '我受理订单',
                component: tsAccept,
                requireAuth: true

            }]
    }]
})
